<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>添加{$title}图片</title>

<style type="text/css">
h1{ text-align:center;font-family: "Microsoft YaHei";font-size: 33px; }
form{ padding:0;margin:0; }
table { background: #CCCCCC; font:15px arial,simsun; }
th { background: #E3E3E3; height: 30px; }
td { background: #FFF; }
input { margin:2px; }
</style>
</head>

 



<body><b><font color="{$alert.color}">{$alert.str}</font></b>

<h1>添加{$title}图片</h1>

<table width="100%" cellspacing="1" cellpadding="2" border="0" align="center">
	<tbody><tr>
		<td>
			<form enctype="multipart/form-data" action="{url("pic/$form")}" method="POST">
				<b>图片：</b><input type="file" name="pic"><br>
				<input type="hidden" value="{$id}" name="id">
				<br><input type="submit" value=" 确定 " name="ok">
			</form>
		</td>
	</tr>
</tbody></table>

<table width="100%" cellspacing="1" cellpadding="2" border="0" align="center">
	<tbody><tr>
		<th>URL</th>
		<th>操作</th>
	</tr>
	{if isset($pics)}
  {foreach from=$pics item=val key=k}
								<tr>
					<td nowrap="nowrap" align="center"><img width="50" height="50" src="{$val.url}"></td>
					<td nowrap="nowrap" align="center"><a href="{$val.url}" target="_blank">预览</a>&nbsp;&nbsp;<a onClick="onDel()" {assign var=foo value=['pic_id'=>$val['pic_id']]}href="{url('pic/del',$foo)}" target="_self" >删除</a></td>
				</tr>
  {/foreach}			
  {/if}		
	<tr>
		<td colspan="13"></td>
	</tr>
</tbody></table>


<iframe hidden="" id="del" name="del" src=""></iframe> 


<script>
	document.getElementById("del").src=""

	function onDel(){
		if (confirm('确定要删除吗？')){
		}else{
			return false;
		}
	}

</script>


</body></html>
